<?php
//ini_set("display_errors",1); 
define('SLIP_GAJI_PATH' , 'files/pdf/sl/');

require_once('components/phpmailer/class.phpmailer.php'); 
my_component_load('testing' , false);
my_component_load('paging' , false); 
my_component_load('data_setting', false);
my_component_load('broadcast_slip' );

$task = isset($_GET['task']) ? $_GET['task'] : ""; 
$id = isset( $_GET['id'] ) ? $_GET['id']:  0;
$periode_id = isset( $_GET['periode_id'] ) ? $_GET['periode_id']:  0;
$modulname = "Penggajian _BN_ Broadcast Data _BN_ Slip Gaji";

if($_SERVER['REQUEST_METHOD'] == "POST"){
	
}else{	
	
	switch($task){
		case "broadcast_page" :
			$content = page_proses_range();
			generate_my_web($content, '' ,'plain.php');
			exit;
		break; 
		case "broadcast_page_proses" :
			$content = page_proses();
			generate_my_web($content, '' ,'plain.php');
			exit;
		break;
		case "sendproses" :
			ini_set("max_execution_time","10000");
			header("Cache-Control: no-cache, must-revalidate");  
			sendproses();
			echo button_icon( 'check2.png' ,'')."<br/>Done !!";
			exit; 
		break;
		case "broadcast" :
			$title=  "Broadcast gaji karyawan"  ;
			facebox_page('index.php?com='.$_GET['com'].'&task=broadcast_page&periode_id='.$periode_id , $title , 150	); 
		break;
		default :
			
			load_facebox_script();
			$content = list_send_timegaji();
		break;
	}
}

generate_my_web($content, $modulname );
